package com.project.pojo.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 修改商品入参类
 * @Author: zhuchi
 * @CreateDate: 2020/10/15 14:47
 * @Version: 1.0
 */
@Data
@ApiModel(value = "修改商品入参类")
public class UpdateProductModel {

    /**
     * 商品ID
     */
    @ApiModelProperty(value = "商品ID")
    @NotNull(message = "请选择要修改的商品")
    private Long productId;

    /**
     * 产品类目ID
     */
    @ApiModelProperty(value = "商品类目ID")
    @NotNull(message = "请选择商品类目")
    private Long categoryId;

    /**
     * 商品二级类目
     */
    @ApiModelProperty(value = "商品二级类目")
    @NotNull(message = "请选择商品二级类目")
    private Long categoryTwoId;

    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    @NotBlank(message = "请填写商品名称")
    private String name;

    /**
     * 商品编码
     */
    @ApiModelProperty(value = "商品编码")
    private String productCode;

    /**
     * 简介
     */
    @ApiModelProperty(value = "简介")
    private String summary;

    /**
     * 商品图片
     */
    @ApiModelProperty(value = "商品图片")
    @NotBlank(message = "请上传商品图片")
    private String productImg;

    /**
     * 产品详情
     */
    @ApiModelProperty(value = "产品详情")
    @NotBlank(message = "请上传商品详情图片")
    private String content;

    /**
     * 售价
     */
    @ApiModelProperty(value = "售价")
    @NotNull(message = "请填写商品售价")
    private BigDecimal price;

    /**
     * 原价
     */
    @ApiModelProperty(value = "原价")
    @NotNull(message = "请填写商品原价")
    private BigDecimal originalPrice;

    /**
     * 供货价
     */
    @ApiModelProperty(value = "供货价")
    @NotNull(message = "请填写商品供货价")
    private BigDecimal favorablePrice;

    /**
     * 品牌
     */
    @ApiModelProperty(value = "品牌")
    private String brand;

    /**
     * 供应商ID
     */
    @ApiModelProperty(value = "供应商ID")
    private Long supplierId;

    /**
     * 供应商
     */
    @ApiModelProperty(value = "供应商")
    private String supplier;

    /**
     * 产品单位
     */
    @ApiModelProperty(value = "产品单位")
    private String unit;

    /**
     * 产地
     */
    @ApiModelProperty(value = "产地")
    private String productOrigin;

    /**
     * 库存
     */
    @ApiModelProperty(value = "库存")
    @NotNull(message = "请填写商品库存")
    private Integer stock;

    /**
     * 商品标签
     */
    @ApiModelProperty(value = "商品标签")
    private List<String> productLabel;

    /**
     * 商品规格
     */
    @ApiModelProperty(value = "商品规格")
    @NotNull(message = "请填写商品规格信息")
    @Size(min = 1, message = "请填写商品规格信息")
    private List<UpdateProductSpecModel> productSpecs;

    /**
     * 商品SKU信息
     */
    @ApiModelProperty(value = "商品SKU信息")
    @NotNull(message = "请填写商品SKU信息")
    @Size(min = 1, message = "请填写商品SKU信息")
    private List<UpdateProductSkuModel> productSkus;

}
